home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / DEV / I-Z / ViewIt™ Shareware.sea / ViewIt™ 2.04 Shareware / Projects / C Demos / FaceStorLC.h < prev    next >
Text File  |  1992-07-30  |  6KB  |  300 lines

  1. /* FaceWare 2.03 Constants & Shared Record */
  2. /* ©FaceWare 1989-92. All Rights Reserved. */
  3.  
  4. /* FaceIt commands */
  5. #define    DoLoop         0L
  6. #define    DoEvnt    -51L
  7. #define    DoMenu    -52L
  8. #define    DoUpdt2   -53L
  9. #define    DoAuto2   -54L
  10. #define    GetMsg    -55L
  11. #define    GetFWs    157L
  12. /* DialIt commands */
  13. #define    NewDlg   1131L
  14. #define    OpnDlg   1132L
  15. #define    EndDlg   1133L
  16. #define    SetDlg   1134L
  17. #define    GetDlg   1135L
  18. #define    ShoDlg   1136L
  19. #define    ChkDlg   1137L
  20. #define    ExtDlg   1138L
  21. #define    DrwDlg   1139L
  22. #define    WinTxt   1147L
  23. #define    WinFnt   1148L
  24. #define    WinCol   1149L
  25. /* UtilIt commands */
  26. #define    DoInit       -61L
  27. #define    DoPrep    -62L
  28. #define    DoUnld    -63L
  29. #define    ChgCur    121L
  30. #define    PstEvt    122L
  31. #define    PopMen    123L
  32. #define    PstNot    124L
  33. #define    SetIdl    131L
  34. #define    EndIdl    132L
  35. #define    ShoAlt    153L
  36. #define    StpAlt    154L
  37. #define    NotAlt    155L
  38. #define    CtnAlt    156L
  39. #define    SetItm1   160L
  40. #define    SetItm2   161L
  41. #define    GetItm    162L
  42. #define    FixFSC    163L
  43. #define    SelFSC    164L
  44. #define    ChkMem    171L
  45. #define    NewBlk    172L
  46. #define    PrgCmd    173L
  47. #define    GetFgC    178L
  48. #define    GetBkC    179L
  49. #define    SetFgC    180L
  50. #define    SetBkC    181L
  51. #define    SetFSS    183L
  52. #define    SetPal2   185L
  53. #define    StdOpn    201L
  54. #define    StdSav    202L
  55. #define    GetRef    205L
  56. #define    SetRef    206L
  57. #define    SetTyp    208L
  58. #define    SndBhd    250L
  59. #define    GetNam    251L
  60. #define    SetNam    252L
  61. #define    MovRec    254L
  62. #define    MovAlt    255L
  63. #define    MovDlg    256L
  64. #define    MovWin    257L
  65. #define    DrgWnd    259L
  66. #define    ShoStr    261L
  67. #define    StpStr    262L
  68. #define    NotStr    263L
  69. #define    CtnStr    264L
  70. #define    GetStd    301L
  71. #define    SetStd    302L
  72. #define    SavDlg    356L
  73. #define    SavWin    357L
  74. #define    GetI2     422L
  75. #define    GetI4     423L
  76. #define    GetR4     425L
  77. #define    GetR8     426L
  78. #define    GetR10    427L
  79. #define    GetR12    428L
  80. #define    SetI2     432L
  81. #define    SetI4     433L
  82. #define    SetR4     435L
  83. #define    SetR8     436L
  84. #define    SetR10    437L
  85. #define    SetR12    438L
  86. #define    SetSub    451L
  87. #define    TrmStr    452L
  88. #define    SetPrm    453L
  89. #define    CnvStr    454L
  90. #define    FndTxt    455L
  91. #define    NumToS    471L
  92. #define    SToNum    481L
  93. #define    GetStr    491L
  94. #define    SetStr    492L
  95. #define    SrtLst    493L
  96. #define    DupLst    494L
  97. /* ViewIt Commands */
  98. #define    AddVew  -1200L
  99. #define    NewWnd  -1201L
  100. #define    EndWnd  -1202L
  101. #define    MdlWnd  -1203L
  102. #define    SizWnd  -1204L
  103. #define MovWnd  -1205L
  104. #define    ShoWnd  -1206L
  105. #define    HidWnd  -1207L
  106. #define    GetWVC  -1208L
  107. #define    GetWnd  -1209L
  108. #define    LnkCtl  -1210L
  109. #define    GetCtl  -1211L
  110. #define    ShoCtl  -1212L
  111. #define    GetVal  -1213L
  112. #define    SetVal  -1214L
  113. #define    OvrCtl  -1215L
  114. #define    AddCtl  -1216L
  115. #define    DrwCtl  -1217L
  116. #define    ScrCtl  -1218L
  117. #define    ActCtl  -1219L
  118. #define    SelCtl  -1220L
  119. #define    DspCtl  -1221L
  120. #define    StlCtl  -1222L
  121. #define    SavCtl  -1223L
  122. #define    SavWnd  -1224L
  123. #define HlpWnd    -1229L
  124.  
  125. /* function prototypes */
  126. void PrepIt (long x, long b, long v, long r, long f);
  127. void FaceIt (void* thePtr, long m1, long m2, long m3, long m4, long m5);
  128.  
  129. /* Global FaceWare record */
  130. typedef struct FaceRec {
  131.     short            fHead[8];
  132.     GrafPtr            fOffPort;
  133.     GrafPtr            fCOffPort;
  134.     WindowPtr        fActiveWnd;
  135.     long            fActiveRec;
  136.     short            fActiveID;
  137.     short            fActiveResID;
  138.     short            fMsgCount;
  139.     long            fFlags;
  140.     Ptr                fStuff;
  141.     long            fHeapBuff;
  142.     long            fEnvFlags;
  143.     long            fSleep;
  144.     Rect            fScreenRect;
  145.     Rect            fDragRect;
  146.     long            fFrontSleep;
  147.     long            fBackSleep;
  148.     short            fFiller1;
  149.     Handle            fStdBlock;
  150.     short            fStdCount;
  151.     short            fSysEnvArr[8];
  152.     short            fApplVRef;
  153.     OSType            fCreator;
  154.     long            fRefCon;
  155.     short            fFiller2[7];
  156.     short            fCursor;
  157.     MenuHandle        fFontMenu;
  158.     MenuHandle        fSizeMenu;
  159.     MenuHandle        fStyleMenu;
  160.     MenuHandle        fColorMenu;
  161.     SignedByte        fFiller3;
  162.     SignedByte        fI1Err;
  163.     short            fI2Err;
  164.     long            fI4Err;
  165.     short            fI8Err[4];
  166.     float            fR4Err;
  167.     short            fR8Err[4];
  168.     short            fR10Err[5];
  169.     short            fR12Err[6];
  170.     short            fFiller4[125];
  171.     long            fWDEF;
  172.     long            fGlueData;
  173.     long            fWaitNextEvent;
  174.     long            fNewWindow;
  175.     long            fNewCWindow;
  176.     long            fGetNewWindow;
  177.     long            fGetNewCWindow;
  178.     long            fGetNewDialog;
  179.     long            fDisposeWindow;
  180.     long            fDisposDialog;
  181.     long            fActiveWindow;
  182.     long            fSelectWindow;
  183.     long            fUpdateOther;
  184.     ProcPtr            fFiller5[9];
  185.     EventRecord        fEvent;
  186. /* DialIt subrecord */
  187.     short            dHead[8];
  188.     DialogPtr        dlogptr;
  189.     Ptr                dataptr;
  190.     long            dFlags;
  191.     short            dBaseID;
  192.     short            dPopID;
  193.     short            listID[20];
  194.     float            slope[20];
  195.     float            intercept[20];
  196.     short            dialog[99];
  197.     short            dHit;
  198.     short            dClick;
  199.     EventRecord        dEvent;
  200. /* UtilIt subrecord */
  201.     short            uHead[8];
  202.     short            uI2;
  203.     long            uI4;
  204.     float            uR4;
  205.     short            uR8[4];
  206.     short            uR10[5];
  207.     short            uR12[6];
  208.     Point            uPt;
  209.     Rect            uRect;
  210.     long            uCommand;
  211.     long            uParam[4];
  212.     long            uResult;
  213.     long            uMenuID;
  214.     long            uMenuItem;
  215.     char            uString[256];
  216.     char            uName[256];
  217.     short            uRGB[3];
  218.     Style            uStyle;
  219.     SignedByte        uI1;
  220.     short            uI8[4];
  221.     MenuHandle        uMenuHdl;
  222. /* ViewIt subrecord */
  223.     short            vHead[8];
  224.     short            vErr;
  225.     ProcPtr            vCDEF;
  226.     ControlHandle    vSelectCtl;
  227.     long            vSelectRec;
  228.     short            vSelectID;
  229. /* info returned by enabled items */
  230.     short            wiHit;
  231.     short            wvHit;
  232.     short            wcHit;
  233.     short            wClick;
  234.     EventRecord        wEvent;
  235. /* window info returned by GetWnd */
  236.     WindowPtr        wWindow;
  237.     short            wResID;
  238.     short            wCount;
  239.     short            wvCount;
  240.     short            wiCount;
  241. /* control info returned by GetCtl */
  242.     ControlHandle    cControl;
  243.     short            ciIndex;
  244.     short            cvIndex;
  245.     short            ccIndex;
  246.     short            cBaseID;
  247. /* info copied from "cControl" block... */
  248.     ControlHandle    cNext;
  249.     WindowPtr        cOwner;
  250.     Rect            cRect;
  251.     SignedByte        cVis;
  252.     SignedByte        cHilite;
  253.     short            cValue;
  254.     short            cMin;
  255.     short            cMax;
  256.     Handle            cInfo;
  257.     Handle            cLoData;
  258.     ProcPtr            cAction;
  259.     long            cRefCon;
  260.     char            cTitle[256];
  261. /* info copied from "cInfo" block...*/
  262.     short            cStuff[6];
  263.     long            cTmplRefCon;
  264.     Ptr                cPtr;
  265.     Handle            cHiData;
  266.     ControlHandle    cView;
  267.     Rect            cOldRect;
  268.     Rect            cClip;
  269.     Rect            cContent;
  270.     Rect            cLimit;
  271.     long            cType;
  272.     short            cVarCode;
  273.     ResType            cResType;
  274.     short            cResID;
  275.     Handle            cResHdl;
  276.     long            cPrivate;
  277.     SignedByte        cFiller;
  278.     SignedByte        cCmdKey;
  279.     short            cPnRound;
  280.     Point            cPnSize;
  281.     SignedByte        cTxJust;
  282.     Style            cTxFace;
  283.     short            cTxSize;
  284.     short            cTxFont;
  285.     short            cDataType;
  286.     SignedByte        cDataDigits;
  287.     SignedByte        cDataFormat;
  288.     short            cDataOffset;
  289.     Ptr                cDataPtr;
  290.     short            cStorType;
  291.     long            cStorPtr;
  292.     Handle            cColors;
  293.     ProcPtr            cOverride;
  294.     short            cCount;
  295.     char            cString[256];
  296. /* Local FCMD record & proc address table */
  297.     short            xEntries;
  298.     long            xTable[40];
  299. } *FacePtr;
  300.